Let $V$ be a vector space, and let $\phi$ be a bilinear form
$$ \phi: V\times V \longrightarrow \mathbb{R} $$If $\phi$ is symmetric, then given a basis $B$ we get a matrix $M_B$ that is symmetric. For $v,w\in V$, and following the characterization here we get:
$$ \phi(v,w)=b^{-1}(v)^t\cdot M_B \cdot b^{-1}(w) $$Since $M_B$ is symmetric, we can apply successive transformations like
$$ \left( \begin{array} { c c c c } { 1 } & { 0 } & { \dots } & { 0 } \\ { - \frac { a _ { 12 } } { a _ { 11 } } } & { 1 } & { } & { \vdots } \\ { \vdots } & { } & { \ddots } & { 0 } \\ { - \frac { a _ { 1 n } } { a _ { 11 } } } & { 0 } & { \dots } & { 1 } \end{array} \right) \cdot \left( \begin{array} { c c c c } { a _ { 11 } } & { a _ { 12 } } & { \dots } & { a _ { 1 n } } \\ { a _ { 12 } } & { } & { } \\ { \vdots } & { } & { M } \\ { a _ { 1 n } } \end{array} \right) \cdot \left( \begin{array} { c c c c } { 1 } & { - \frac { a _ { 12 } } { a _ { 11 } } } & { \dots } & { - \frac { a _ { 1 n } } { a _ { 11 } } } \\ { 0 } & { 1 } & { } & { 0 } \\ { \vdots } & { } & { \ddots } & { \vdots } \\ { 0 } & { \ldots } & { 0 } & { 1 } \end{array} \right)= \left( \begin{array} { c c c c c } { a _ { 11 } } & { 0 } & { \dots } & { 0 } \\ { 0 } & { } & { } \\ { \vdots } & { } & { M ^ { \prime } } \\ { 0 } & { } & { } & { } \end{array} \right) $$And so we get a diagonal matrix $D$ that verify:
$$ D=P^t M_B P $$If we considerate a new basis $N$ such that $n=b\circ P$, it is clear that the coordinates of $v$ and $w$ are $n^{-1}(v)=P^{-1}b^{-1}(v)$ and $n^{-1}(w)=P^{-1}b^{-1}(w)$. Since
$$ \phi(v,w)=b^{-1}(v)^t\cdot M_B \cdot b^{-1}(w)=n^{-1}(v)^t\cdot D \cdot n^{-1}(w) $$we conclude that $D$ is the matrix of $\phi$ in the new basis $N$.
From here, with an easy change of basis, rearranging the elements and scaling them by $\frac{1}{\sqrt{a_{ii}}}$, we obtain that the matrix is of the form:
$$ \left( D \right) _ { i j } = \left\{ \begin{array} { c l } { 1 } & { \text { si } 1 \leq i \leq r , j = i } \\ { - 1 } & { \text { si } r + 1 \leq i \leq s , j = i } \\ { 0 } & { \text { otherwise} } \end{array} \right. $$The integers $r$ and $s$ are constant through base changes and they allow us to define the signature of the bilinear forms.
________________________________________
________________________________________
________________________________________
Author of the notes: Antonio J. Pan-Collantes
INDEX: